package gobase

import "hash/crc32"

func CRC32Buf(buf []byte) uint32 {
	return CRC32(buf, len(buf))

}

func CRC32(buf []byte, len int) uint32 {
	return crc32.Checksum(buf[:len], crc32.IEEETable)
}

func CRC32Continue(crc uint32, buf ...byte) uint32 {
	return crc32.Update(crc, crc32.IEEETable, buf)
}
